package com.lt.integration.jpa.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Target( { METHOD, FIELD, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = MobileValidator.class)
@Documented
public @interface Mobile {
	
	String message() default "{mobile.error}"; //提示信息,可以写死,可以填写国际化的key  
    
    String regexp() default "1\\d{10}";
    
    Class<?>[] groups() default {};
    
    Class<? extends Payload>[] payload() default {};
}
